home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
forlib1.arc
/
STJRP01.DOC
< prev
next >
Wrap
Text File
|
1986-04-01
|
10KB
|
217 lines
MICROSOFT FORTRAN COMPILER ASSEMBLER ENHANCMENTS V 1.02
(C) John R. Petrocelli 04/01/86
3890 Carman Rd.
Schenectady, N.Y. 12303
------------------------------------------------------------------------
All of the following routines are included in the file STJRP01.LIB
------------------------------------------------------------------------
Permission is granted to copy and incorporate these routines in any
user written code. As such no fee may be associated with their individual
copying and use. This DOES NOT PRECLUDE fees associated with user written
software which may incorporate these routines. In all cases, however, all
copyright notes must remain intact.
The author makes no waranties of any kind and assumes no respons-
ability for loss of data or time associated with their use.
All of the routines have been tested and performed as specified in
each of the tests. Any problems, suggestions or comments should be
fowarded to the author.
------------------------------------------------------------------------
------------------------------------------------------------------------
All of the following routines are included in the file STJRP01.LIB
Should you need to alter any of the routines you merely have to enter
it as an .OBJ file at LINK time. The LINKER will accept the first
name matched for a call or function.
------------------------------------------------------------------------
------------------------------------------------------------------------
1. Date and Time--------------object module "TOD.OBJ"
CALL PCDATE(YEAR,MONTH,DAY)
Note: arguments should be declared integer*2
CALL PCTIME(HOUR,MINUTE,SECOND,MILSEC)
Note: arguments should be declared integer*2
CALL TAD(MO1,MO2,DA1,DA2,YEAR,YR1,YR2,HR1,HR2,MIN1,MIN2,SEC1,SEC2)
Note: 1. arguments should be declared integer*2
2. this is a FORTRAN LANGUAGE SUBROUTINE which will
interface with PCDATE and PCTIME
3. the variables xx1 and xx2 are the 10's and 1's
digit for each of the various parameters(MO=month
DA=day etc) while the variable YEAR is the full
4 digit YEAR value.
------------------------------------------------------------------------
1. Day of Week ---------------object module "DOW.OBJ"
CALL WEEKDY(MONTH,DAY,YEAR,DOFWK)
Note: 1. arguments should be declared Integer*2
2. Year must be the full 4 digit year(1980,1985 etc)
and may range from 1901 to 2099. Leap years are
properly handled since the year 2000 is a turn of
the century divisible by 400 and it is in fact also
divisible by 4 like the normal leap years
3. The variable DOFWK is the integer specifying the
DAY OF WEEK where: 1=Sunday 2=Monday 3=Tuesday
4=Wednesday 5=Thursday 6=Friday
7=Saturday
------------------------------------------------------------------------
2. String manipulation--------object module "STRING.OBJ"
CALL SUBSTR(TARGET,TSTART,TEND,SOURCE,SSTART,SEND)
Note: 1. arguments TARGET and SOURCE must be character
2. agruments TSTART, TEND, SSTART, and SEND should
be declared integer*2
3. this routine will copy characters from SOURCE
possition SSTART to SEND into characters of
TARGET possition TSTART to TEND
------------------------------------------------------------------------
3. Video Display control------object module "VIDEO.OBJ"
CALL VIDCOL(COLOR)
Note: 1. argument COLOR must be declared character*2
2. COLOR is a value as defined on page 13-9 of
the DOS manual
3. This routine requires that your "CONGIG.SYS" file
contains the parameter "DEVICE=ANSI.SYS"
CALL VIDCLR
Note: 1. This will clear the screen
2. This routine DOES NOT REQUIRE that your "CONFIG.SYS"
file contains the parameter "DEVICE=ANSI.SYS"
CALL VIDCLZ
Note: 1. This will clear the screen
2. This routine REQUIRES that your "CONGIG.SYS" file
contains the parameter "DEVICE=ANSI.SYS"
CALL VIDLCR(ROW,COL)
Note: 1. arguments ROW and COL must be declared integer*2
2. this routine will determine what row and column the
cursor is located on the display
CALL VIDMCR(ROW,COL)
Note: 1. arguments ROW and COL must be declared integer*2
2. this routine will move the cursor to the specified
row and column on the display
3. backslash (\) editing may be needed in your FORMAT
statements
CALL VIDCSR(START,END,CODE,RC)
Note: 1. arguments START, END, CODE, and RC should be
declared integer*2
2. arguments START and END reference the cursor lines
(0 to 4 for the monochrome display and 0 to 7 for
the color graphics display) from top to bottom. if
START is greater than END then the cursor is split
3. argument CODE may be 0 to get the cursor START and
END lines or 1 to set the lines
4. argument RC is the return code from the call
CALL VIDSCN(SCREEN)
Note: 1. argument SCREEN should be declared integer*2
2. argument SCREEN is the active screen on the display
(0 to 7 in 40 column text mode and 0 to 3 in 80
column text mode)
CALL VIDMOD(MODE)
Note: 1. argument MODE should be declared integer*2
2. argument MODE is the current video mode as follow:
0=40x25 b/w alpha 4=320x200 color graphics
1=40x25 color alpha 5=320x200 b/w graphics
2=80x25 b/w alpha 6=640x200 b/w graphics
3=80x25 color alpha
------------------------------------------------------------------------
4. Keyboard Input Control-----object module "KEYPGM.OBJ"
CALL KEYBUF(BUFFER,KEYSIN,CHARIN)
Note: 1. arguments BUFFER and KEYSIN should be declared
integer*2
2. argument CHARIN must be declared character*n
where n is the maximum number of characters that
will be read in
3. argument BUFFER is the maximum number of characters
(not including <enter>) that may be typed in before
the speaker will beep
4. argument KEYSIN is the number of characters actually
input (not including <enter>)
5. argument CHARIN will return the characters actually
input (not including <enter>)
6. this routine is useful in limiting the length of
data entry vs using a read which may truncate input
characters
7. if the requested character count (BUFFER) is greater
than 80 or less than 1 then the returned value of
KEYSIN is set to 255
CALL KEYIN(CHARIN)
1. argument CHARIN should be declared character*1
2. this routine will cause the program to wait for
a key stroke before continuing and return the
actual key typed in CHARIN
------------------------------------------------------------------------
4. Sound----------------------object module "SOUND.OBJ"
CALL SOUND(FREQ,HSEC)
Note: 1. arguments FREQ and HSEC must be declared integer*4
2. argument FREQ is the frequency in HERTZ ranging
from 21 to 65535
3. argument HSEC is the duration in hundredths(.01)
seconds ranging from 0 to 65535
------------------------------------------------------------------------
5. peak n poke----------------object module "PEAKPOKE.OBJ"
CALL PEAK(SEGMNT,OFFSET,VALUE)
note: 1. arguments SEGMNT, OFFSET, and VALUE should be
declared integer*2
2. this routine will return VALUE with the contents of
memory address SEGMNT:OFFSET
CALL POKE(SEGMNT,OFFSET,VALUE)
note: 1. arguments SEGMNT, OFFSET, and VALUE should be
declared integer*2
2. this routine will load VALUE into the contents of
memory address SEGMNT:OFFSET
------------------------------------------------------------------------
5. dos functions -------------object module "DOSFOR.OBJ"
CALL DOSVER(MAJOR,MINOR)
note: 1. arguments MAJOR AND MINOR should be declared
integer*2
2. this routine will return MAJOR and MINOR components
of the DOS version. Thus for DOS 3.10 MAJOR would
be equal to 3 and MINOR would be equal to 10.
------------------------------------------------------------------------
6. set dos return code--------object module "SETRC.OBJ"
CALL SETRC(RC)
note: 1. argument RC should be declared integer*2
and can range from 0 to 255.
2. this routine will set the return code. This should
be called just before a "STOP" statement in your
FORTRAN source. The RETURN CODE may be retrieved
by:
A) testing the return code value in the
SPAWN and SYSTEM functions in Microsoft
Fortran V3.30 or later.
B) testing the ERRORLEVEL in BATCH files
C) using DOS function 4Dh in assembler
------------------------------------------------------------------------